<template>
  <div class="zongkuangjia">
    <el-container class="out-container">
      <el-aside class="out-left" width="180px">
        <el-menu default-active="1-4-1" class="el-menu-vertical-demo">
          <!-- <el-menu-item index="1" @click="gotomydb()">
              <i class="el-icon-edit-outline"></i>
              <span slot="title">消息动作</span>
            </el-menu-item> -->
          <el-menu-item index="2" @click="gotomyxx()">
            <i class="el-icon-chat-dot-round"></i>
            <span slot="title">发送机制维护</span>
          </el-menu-item>
          <el-menu-item index="3" @click="gotomygj()">
            <i class="el-icon-sunrise"></i>
            <span slot="title">模板管理</span>
          </el-menu-item>
          <!-- <el-menu-item index="4" @click="gotomyhsz()">
              <i class="el-icon-tickets"></i>
              <span slot="title">消息类型</span>
            </el-menu-item> -->
          <el-menu-item index="5" @click="gotomyhsz()">
            <i class="el-icon-chat-dot-square"></i>
            <span slot="title">消息主题</span>
          </el-menu-item>
          <el-menu-item index="6" @click="gotomyhsz()">
            <i class="el-icon-user"></i>
            <span slot="title">用户主题</span>
          </el-menu-item>
          <el-menu-item index="7" @click="gotomyhsz()">
            <i class="el-icon-edit"></i>
            <span slot="title">消息创建</span>
          </el-menu-item>
          <el-menu-item index="8" @click="gotomyhsz()">
            <i class="el-icon-search"></i>
            <span slot="title">消息查询</span>
          </el-menu-item>
          <el-menu-item index="9" @click="gotomyhsz()">
            <i class="el-icon-reading"></i>
            <span slot="title">历史消息查询</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-main class="out-main">
        <div class="table_list">
          <component :is="Tablist"></component>
        </div>
      
      </el-main>
    </el-container>
  </div>
</template>

<script>
import Tablist from "./components/send/send";//发送消息机制页面
import MessageSubject from "./components/messagesubject/index";//消息主题页面
export default {
  components: {
    Tablist,MessageSubject
  },
  data() {
    return {
      tab_form: true,
      Tablist: Tablist,
      Text: "添加",
      Class: "el-icon-folder-add",
    };
  },
  methods: {
    gotomyxx() {
      this.Tablist = 'Tablist'
    },
    gotomygj() {},
    gotomyhsz() {
      this.Tablist = 'MessageSubject'
    }
  },
  created(){
    // 模拟登陆页面缓存的账号信息，正式后请注释
     sessionStorage.setItem("userid", "1008611");
      sessionStorage.setItem("username", "移动客服");
  }
};
</script>

<style scoped lang="less">
.zongkuangjia {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.out-container {
  height: 100%;
  background-color: #fff;
}
.out-left {
  border: 2px solid #eee;
}
.el-main {
  padding: 0px;
  overflow: hidden;
  background-color: #f6f8f9;
}
.tab_list {
  padding-top: 10px;
}

</style>
